package com.errol.generic.baiducloud.basic.pojo;

import lombok.Data;

/**
 * 百度云应用 token 缓存
 *
 * @author zhang xiao bin
 * @version v1.0
 * @date 2020/09/21
 * @since v4.7.2
 **/
@Data
public class BaiduAccessTokenCache {

    private String appId;
    private String accessToken;
    private long expireTimestamp;

    public BaiduAccessTokenCache(String appId, String accessToken, long expire) {
        this.appId = appId;
        this.accessToken = accessToken;
        this.expireTimestamp = System.currentTimeMillis() + (expire - 3600) * 1000;
    }
}
